import { createRouter, createWebHistory } from 'vue-router'

import { routes } from './router'

const router = createRouter({
  history: createWebHistory(),
  routes: routes, // 静态注册: 项目运行初始化时就注册上了
  scrollBehavior() {
    return { top: 0, left: 0 }
  },
})

// 导出路由
export default router
